import type { RouteConfig } from '../../typings/router';
import dictItemController from '../controllers/dictItem';

/**
 * 数据字典模块路由
 */
const dictItemRoutes: RouteConfig[] = [
    {
        method: 'get',
        name: 'dictItemRetrieve',
        path: '/dictItem/retrieve',
        middlewares: [dictItemController.retrieveAction],
    },
    {
        method: 'post',
        name: 'dictItemAdd',
        path: '/dictItem/add',
        middlewares: [dictItemController.addAction],
    },
    {
        method: 'delete',
        name: 'dictItemDelete',
        path: '/dictItem/delete',
        middlewares: [dictItemController.deleteAction],
    },
    {
        method: 'put',
        name: 'dictItemUpdate',
        path: '/dictItem/update',
        middlewares: [dictItemController.updateAction],
    },
    {
        method: 'get',
        name: 'dictItemList',
        path: '/dictItem/list',
        middlewares: [dictItemController.listAction],
    },
];

export default dictItemRoutes;
